<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cutex: cutex::QxOptional&lt; T &gt; Template-Klassenreferenz</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">cutex
   </div>
   <div id="projectbrief">cute Qt extensions</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Erzeugt von Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Suchen','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Suchen');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classcutex_1_1_qx_optional.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Öffentliche Methoden</a> &#124;
<a href="#pri-attribs">Private Attribute</a> &#124;
<a href="classcutex_1_1_qx_optional-members.html">Aufstellung aller Elemente</a>  </div>
  <div class="headertitle">
<div class="title">cutex::QxOptional&lt; T &gt; Template-Klassenreferenz</div>  </div>
</div><!--header-->
<div class="contents">

<p>Die Klasse QxOptional speichert optionale Werte.  
 <a href="classcutex_1_1_qx_optional.html#details">Mehr ...</a></p>

<p><code>#include &lt;<a class="el" href="qxoptional_8h_source.html">qxoptional.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Öffentliche Methoden</h2></td></tr>
<tr class="memitem:a48f8d9d19f2e920e39dda37eb913e77d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcutex_1_1_qx_optional.html#a48f8d9d19f2e920e39dda37eb913e77d">QxOptional</a> ()</td></tr>
<tr class="separator:a48f8d9d19f2e920e39dda37eb913e77d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9298e694fd44475b5b8c19fcfd38a326"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcutex_1_1_qx_optional.html#a9298e694fd44475b5b8c19fcfd38a326">QxOptional</a> (const T &amp;<a class="el" href="classcutex_1_1_qx_optional.html#ac583d10e6d272fd412883b6a3f1f8f2b">value</a>)</td></tr>
<tr class="separator:a9298e694fd44475b5b8c19fcfd38a326"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab37dd6c3ed9fb140ece233eaab828302"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcutex_1_1_qx_optional.html#ab37dd6c3ed9fb140ece233eaab828302">clear</a> ()</td></tr>
<tr class="separator:ab37dd6c3ed9fb140ece233eaab828302"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59fa8edec5a3d9e7815f27de7821a612"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcutex_1_1_qx_optional.html#a59fa8edec5a3d9e7815f27de7821a612">hasValue</a> () const</td></tr>
<tr class="separator:a59fa8edec5a3d9e7815f27de7821a612"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac583d10e6d272fd412883b6a3f1f8f2b"><td class="memItemLeft" align="right" valign="top">T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcutex_1_1_qx_optional.html#ac583d10e6d272fd412883b6a3f1f8f2b">value</a> (const T &amp;defaultValue=T()) const</td></tr>
<tr class="separator:ac583d10e6d272fd412883b6a3f1f8f2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acae7f4cb6add83cccee8bb71a57dc699"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcutex_1_1_qx_optional.html#acae7f4cb6add83cccee8bb71a57dc699">setValue</a> (const T &amp;<a class="el" href="classcutex_1_1_qx_optional.html#ac583d10e6d272fd412883b6a3f1f8f2b">value</a>)</td></tr>
<tr class="separator:acae7f4cb6add83cccee8bb71a57dc699"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attribute</h2></td></tr>
<tr class="memitem:a9757d051e5ca26e678a3017c37e1feaf"><td class="memItemLeft" align="right" valign="top"><a id="a9757d051e5ca26e678a3017c37e1feaf"></a>
QPair&lt; bool, T &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>m_data</b></td></tr>
<tr class="separator:a9757d051e5ca26e678a3017c37e1feaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Ausführliche Beschreibung</h2>
<div class="textblock"><h3>template&lt;typename T&gt;<br />
class cutex::QxOptional&lt; T &gt;</h3>

<p>Die Klasse QxOptional speichert optionale Werte. </p>
<p>QxOptional ist eine Template-basierte Klasse, die sich an boost::optional, bzw. std::optional orientiert. QxOptional hat allerdings keine Pointer-Semantik und die Schnittstelle ist auch nicht mit boost::optional, bzw. std::optional kompatibel. </p>
</div><h2 class="groupheader">Beschreibung der Konstruktoren und Destruktoren</h2>
<a id="a48f8d9d19f2e920e39dda37eb913e77d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a48f8d9d19f2e920e39dda37eb913e77d">&#9670;&nbsp;</a></span>QxOptional() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QxOptional::QxOptional </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Erzeugt ein neues Objekt ohne Wert. </p>

</div>
</div>
<a id="a9298e694fd44475b5b8c19fcfd38a326"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9298e694fd44475b5b8c19fcfd38a326">&#9670;&nbsp;</a></span>QxOptional() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QxOptional::QxOptional </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Erzeugt ein neues Objekt mit dem Wert <em>value</em>. </p>

</div>
</div>
<h2 class="groupheader">Dokumentation der Elementfunktionen</h2>
<a id="ab37dd6c3ed9fb140ece233eaab828302"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab37dd6c3ed9fb140ece233eaab828302">&#9670;&nbsp;</a></span>clear()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QxOptional::clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Löscht den optionalen Wert. </p>

</div>
</div>
<a id="a59fa8edec5a3d9e7815f27de7821a612"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59fa8edec5a3d9e7815f27de7821a612">&#9670;&nbsp;</a></span>hasValue()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QxOptional::hasValue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gibt true zurück, wenn ein Wert vorhanden ist. </p>

</div>
</div>
<a id="acae7f4cb6add83cccee8bb71a57dc699"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acae7f4cb6add83cccee8bb71a57dc699">&#9670;&nbsp;</a></span>setValue()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QxOptional::setValue </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Setzt den Wert auf den Wert <em>value</em>.</p>
<dl class="section see"><dt>Siehe auch</dt><dd><a class="el" href="classcutex_1_1_qx_optional.html#ac583d10e6d272fd412883b6a3f1f8f2b">value</a>(const T &amp;defaultValue = T()) const </dd></dl>

</div>
</div>
<a id="ac583d10e6d272fd412883b6a3f1f8f2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac583d10e6d272fd412883b6a3f1f8f2b">&#9670;&nbsp;</a></span>value()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QxOptional::value </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>defaultValue</em> = <code>T()</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gibt den Wert, bzw. wenn kein Wert vorhanden ist <em>defaultValue</em> zurück.</p>
<dl class="section see"><dt>Siehe auch</dt><dd><a class="el" href="classcutex_1_1_qx_optional.html#acae7f4cb6add83cccee8bb71a57dc699">setValue(const T &amp;value)</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>cutex</b></li><li class="navelem"><a class="el" href="classcutex_1_1_qx_optional.html">QxOptional</a></li>
    <li class="footer">Erzeugt von <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
